# Contributor: Dennis Krupenik <dennis@krupenik.com>
# Maintainer: Dennis Krupenik <dennis@krupenik.com>
pkgname=igt-gpu-tools
pkgver=1.25
pkgrel=0
pkgdesc="IGT GPU Tools is a collection of tools for development and testing of the DRM drivers."
url="https://gitlab.freedesktop.org/drm/igt-gpu-tools/"
arch="x86_64" # Mostly used for Intel integrated GPUs
license="MIT"
depends_dev="alsa-lib-dev cairo-dev curl-dev elfutils-dev eudev-dev gsl-dev
	json-c-dev kmod-dev libdrm-dev liboping-dev libpciaccess-dev libunwind-dev
	libxrandr-dev libxv-dev pixman-dev procps-dev xmlrpc-c-dev"
makedepends="bison flex meson $depends_dev"
subpackages="$pkgname-dev"
source="https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/archive/igt-gpu-tools-$pkgver/igt-gpu-tools-igt-gpu-tools-$pkgver.tar.bz2
	bash-sh.patch
	musl.patch"
builddir="$srcdir/igt-gpu-tools-igt-gpu-tools-$pkgver"

build() {
	abuild-meson \
		-Dvalgrind=disabled \
		. build
	ninja -C build
}

check() {
	ninja -C build test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

sha512sums="47a31c0af733e9481e3e8e718adede0a05cb04064d80dae6a7753a346deb71333fb8310664084f4dddfec957629e93c188bc44f2a6895744a10107e4823a9ee6  igt-gpu-tools-igt-gpu-tools-1.25.tar.bz2
0e24d93cdc56517c78fbcdc64dac63067c9cf49bed66e3b2b6dec6111d67c7e27a2ad7ddb9f1e373746b4b8e9e3535993f8261800fc3729d1f2cdef37e392fc5  bash-sh.patch
a79a3d4134a75e450b18188189614ad0b3d4218007c8ce68c74f5a928258ca8838ccce5c1f64f920038c44e188896d8d504a36e3cbdf1f8f16c3904bb3b9955f  musl.patch"
